package org.jground.rx.ui.zk;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.zkoss.zk.ui.GenericRichlet;
import org.zkoss.zk.ui.Page;

public class UIRichlet extends GenericRichlet {

    private static Log logger = LogFactory.getLog(UIRichlet.class);

    // public static UIFrame createUIFrame(Component parent) {
    // return new UIFrame(parent, RXInitServlet.getUIProperties());
    // }

    //
    //
    // 

    public UIRichlet() {
      
        
    }

    private Page page;

    // private UIFrame uiFrame;

    public void service(Page page) {
        logger.debug("start service of " + this.getClass().getName());
        this.page = page;
        new UIMasterFrame(page);
 
        // Window win = new ListboxWindow( );
        // win.setPage(page);
        // new BorderLayoutTest(page);
        // new FCKEditorTest(page);
        // new ImageView(page);
    }

    public boolean isAsap() {
        return false;
    }

    public Page getPage() {
        return page;
    }

    public void destroy() {
        logger.info("Richlet " + this.getClass().getName() + " is going down (destroy).");
        super.destroy();
    }

}
